﻿namespace HRM.CORE.REPORT
{
    using DevExpress.Utils;
    using DevExpress.XtraPrinting;
    using DevExpress.XtraReports.UI;
    using HRM.CORE;
    using HRM.CORE.CLASS;
    
    
    using System; using Extra.ERP;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Drawing.Printing;

    public class rptListWork : XtraReport
    {
        private BottomMarginBand BottomMargin;
        private XRTableCell colBirthday;
        private XRTableCell colBirthPlace;
        private XRTableCell colEmployeeCode;
        private XRTableCell colFirstName;
        private XRTableCell colLastName;
        private XRTableCell colMainAddress;
        private XRTableCell colOrder;
        private XRTableCell colPosition;
        private XRTableCell colSex;
        private IContainer components;
        private DetailBand Detail;
        private XRTableCell dtBirthday;
        private XRLabel dtDate;
        private GroupHeaderBand GroupHeader1;
        private DateTime m_BeginDate;
        private DateTime m_EndDate;
        private int m_Order;
        private int m_Status;
        private string m_Time;
        private XRPictureBox ptPhoto;
        private ReportFooterBand ReportFooter;
        private ReportHeaderBand ReportHeader;
        private TopMarginBand TopMargin;
        private XRLabel txtAddress;
        private XRLabel txtCompany;
        private XRTableCell txtComplete;
        private XRTableCell txtEmployeeAddress;
        private XRTableCell txtEmployeeCode;
        private XRTableCell txtFirstName;
        private XRLabel txtInformation;
        private XRTableCell txtLastName;
        private XRTableCell txtOrder;
        private XRTableCell txtPosition;
        private XRTableCell txtStatus;
        private XRLabel txtTitle;
        private XRLabel xrLabel2;
        private XRTable xrTable1;
        private XRTable xrTable2;
        private XRTableCell xrTableCell1;
        private XRTableCell xrTableCell2;
        private XRTableRow xrTableRow1;
        private XRTableRow xrTableRow2;

        public rptListWork()
        {
            this.components = null;
            this.m_Time = "";
            this.m_BeginDate = DateTime.Now;
            this.m_EndDate = DateTime.Now;
            this.m_Status = 0;
            this.m_Order = 0;
            this.InitializeComponent();
        }

        public rptListWork(string Time, DateTime BeginDate, DateTime EndDate, int Status)
        {
            this.components = null;
            this.m_Time = "";
            this.m_BeginDate = DateTime.Now;
            this.m_EndDate = DateTime.Now;
            this.m_Status = 0;
            this.m_Order = 0;
            this.InitializeComponent();
            this.m_Time = Time;
            this.m_BeginDate = BeginDate;
            this.m_EndDate = EndDate;
            this.m_Status = Status;
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void InitializeComponent()
        {
            this.Detail = new DetailBand();
            this.xrTable2 = new XRTable();
            this.xrTableRow2 = new XRTableRow();
            this.txtOrder = new XRTableCell();
            this.txtEmployeeCode = new XRTableCell();
            this.txtFirstName = new XRTableCell();
            this.txtLastName = new XRTableCell();
            this.dtBirthday = new XRTableCell();
            this.txtStatus = new XRTableCell();
            this.txtComplete = new XRTableCell();
            this.txtEmployeeAddress = new XRTableCell();
            this.xrTableCell2 = new XRTableCell();
            this.txtPosition = new XRTableCell();
            this.TopMargin = new TopMarginBand();
            this.BottomMargin = new BottomMarginBand();
            this.ReportHeader = new ReportHeaderBand();
            this.dtDate = new XRLabel();
            this.txtTitle = new XRLabel();
            this.txtInformation = new XRLabel();
            this.txtAddress = new XRLabel();
            this.ptPhoto = new XRPictureBox();
            this.txtCompany = new XRLabel();
            this.xrLabel2 = new XRLabel();
            this.GroupHeader1 = new GroupHeaderBand();
            this.xrTable1 = new XRTable();
            this.xrTableRow1 = new XRTableRow();
            this.colOrder = new XRTableCell();
            this.colEmployeeCode = new XRTableCell();
            this.colFirstName = new XRTableCell();
            this.colLastName = new XRTableCell();
            this.colBirthday = new XRTableCell();
            this.colSex = new XRTableCell();
            this.colBirthPlace = new XRTableCell();
            this.colMainAddress = new XRTableCell();
            this.xrTableCell1 = new XRTableCell();
            this.colPosition = new XRTableCell();
            this.ReportFooter = new ReportFooterBand();
            this.xrTable2.BeginInit();
            this.xrTable1.BeginInit();
            this.BeginInit();
            this.Detail.Controls.AddRange(new XRControl[] { this.xrTable2 });
            this.Detail.HeightF = 29.16667f;
            this.Detail.Name = "Detail";
            this.Detail.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.Detail.TextAlignment = TextAlignment.TopLeft;
            this.xrTable2.Borders = BorderSide.Bottom | BorderSide.Right | BorderSide.Left;
            this.xrTable2.LocationFloat = new PointFloat(0f, 0f);
            this.xrTable2.Name = "xrTable2";
            this.xrTable2.Rows.AddRange(new XRTableRow[] { this.xrTableRow2 });
            this.xrTable2.SizeF = new SizeF(1087f, 29.16667f);
            this.xrTable2.StylePriority.UseBorders = false;
            this.xrTableRow2.Cells.AddRange(new XRTableCell[] { this.txtOrder, this.txtEmployeeCode, this.txtFirstName, this.txtLastName, this.dtBirthday, this.txtStatus, this.txtComplete, this.txtEmployeeAddress, this.xrTableCell2, this.txtPosition });
            this.xrTableRow2.Name = "xrTableRow2";
            this.xrTableRow2.Weight = 1.0;
            this.txtOrder.Name = "txtOrder";
            this.txtOrder.Padding = new PaddingInfo(4, 0, 0, 0, 100f);
            this.txtOrder.StylePriority.UsePadding = false;
            this.txtOrder.StylePriority.UseTextAlignment = false;
            this.txtOrder.Text = "txtOrder";
            this.txtOrder.TextAlignment = TextAlignment.MiddleLeft;
            this.txtOrder.Weight = 0.18749981602642024;
            this.txtOrder.BeforePrint += new PrintEventHandler(this.txtOrder_BeforePrint);
            this.txtEmployeeCode.Name = "txtEmployeeCode";
            this.txtEmployeeCode.Padding = new PaddingInfo(4, 0, 0, 0, 100f);
            this.txtEmployeeCode.StylePriority.UsePadding = false;
            this.txtEmployeeCode.StylePriority.UseTextAlignment = false;
            this.txtEmployeeCode.Text = "[Work]";
            this.txtEmployeeCode.TextAlignment = TextAlignment.MiddleLeft;
            this.txtEmployeeCode.Weight = 1.3263888396351959;
            this.txtFirstName.Name = "txtFirstName";
            this.txtFirstName.Padding = new PaddingInfo(4, 0, 0, 0, 100f);
            this.txtFirstName.StylePriority.UsePadding = false;
            this.txtFirstName.StylePriority.UseTextAlignment = false;
            this.txtFirstName.Text = "[Priority]";
            this.txtFirstName.TextAlignment = TextAlignment.MiddleCenter;
            this.txtFirstName.Weight = 0.26100047984824692;
            this.txtLastName.Name = "txtLastName";
            this.txtLastName.Padding = new PaddingInfo(4, 0, 0, 0, 100f);
            this.txtLastName.StylePriority.UsePadding = false;
            this.txtLastName.StylePriority.UseTextAlignment = false;
            this.txtLastName.Text = "[BeginDate!dd/MM/yyyy]";
            this.txtLastName.TextAlignment = TextAlignment.MiddleLeft;
            this.txtLastName.Weight = 0.36400020677936962;
            this.dtBirthday.Name = "dtBirthday";
            this.dtBirthday.Padding = new PaddingInfo(4, 0, 0, 0, 100f);
            this.dtBirthday.StylePriority.UsePadding = false;
            this.dtBirthday.StylePriority.UseTextAlignment = false;
            this.dtBirthday.Text = "[EndDate!dd/MM/yyyy]";
            this.dtBirthday.TextAlignment = TextAlignment.MiddleLeft;
            this.dtBirthday.Weight = 0.36449938281774408;
            this.txtStatus.Name = "txtStatus";
            this.txtStatus.Padding = new PaddingInfo(4, 0, 0, 0, 100f);
            this.txtStatus.StylePriority.UsePadding = false;
            this.txtStatus.StylePriority.UseTextAlignment = false;
            this.txtStatus.Text = "[Status]";
            this.txtStatus.TextAlignment = TextAlignment.MiddleCenter;
            this.txtStatus.Weight = 0.56861118153390422;
            this.txtStatus.BeforePrint += new PrintEventHandler(this.txtStatus_BeforePrint);
            this.txtComplete.Name = "txtComplete";
            this.txtComplete.Padding = new PaddingInfo(4, 0, 0, 0, 100f);
            this.txtComplete.StylePriority.UsePadding = false;
            this.txtComplete.StylePriority.UseTextAlignment = false;
            this.txtComplete.Text = "[Complete]";
            this.txtComplete.TextAlignment = TextAlignment.MiddleCenter;
            this.txtComplete.Weight = 0.37333431459378408;
            this.txtComplete.BeforePrint += new PrintEventHandler(this.txtComplete_BeforePrint);
            this.txtEmployeeAddress.Name = "txtEmployeeAddress";
            this.txtEmployeeAddress.Padding = new PaddingInfo(0, 4, 0, 0, 100f);
            this.txtEmployeeAddress.StylePriority.UsePadding = false;
            this.txtEmployeeAddress.StylePriority.UseTextAlignment = false;
            this.txtEmployeeAddress.Text = "[Cost!#,0]";
            this.txtEmployeeAddress.TextAlignment = TextAlignment.MiddleRight;
            this.txtEmployeeAddress.Weight = 0.355889041759081;
            this.xrTableCell2.Name = "xrTableCell2";
            this.xrTableCell2.Padding = new PaddingInfo(4, 0, 0, 0, 100f);
            this.xrTableCell2.StylePriority.UsePadding = false;
            this.xrTableCell2.StylePriority.UseTextAlignment = false;
            this.xrTableCell2.Text = "[EmployeeName]";
            this.xrTableCell2.TextAlignment = TextAlignment.MiddleLeft;
            this.xrTableCell2.Weight = 0.54082082217881877;
            this.txtPosition.Name = "txtPosition";
            this.txtPosition.Padding = new PaddingInfo(4, 0, 0, 0, 100f);
            this.txtPosition.StylePriority.UsePadding = false;
            this.txtPosition.StylePriority.UseTextAlignment = false;
            this.txtPosition.Text = "[Description]";
            this.txtPosition.TextAlignment = TextAlignment.MiddleLeft;
            this.txtPosition.Weight = 1.1992895736816016;
            this.TopMargin.HeightF = 70f;
            this.TopMargin.Name = "TopMargin";
            this.TopMargin.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.TopMargin.TextAlignment = TextAlignment.TopLeft;
            this.BottomMargin.HeightF = 56f;
            this.BottomMargin.Name = "BottomMargin";
            this.BottomMargin.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.BottomMargin.TextAlignment = TextAlignment.TopLeft;
            this.ReportHeader.Controls.AddRange(new XRControl[] { this.dtDate, this.txtTitle, this.txtInformation, this.txtAddress, this.ptPhoto, this.txtCompany, this.xrLabel2 });
            this.ReportHeader.HeightF = 134f;
            this.ReportHeader.Name = "ReportHeader";
            this.dtDate.LocationFloat = new PointFloat(899.2709f, 10.00001f);
            this.dtDate.Name = "dtDate";
            this.dtDate.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.dtDate.SizeF = new SizeF(187.7291f, 17.99998f);
            this.dtDate.StylePriority.UseTextAlignment = false;
            this.dtDate.Text = "dtDate";
            this.dtDate.TextAlignment = TextAlignment.MiddleRight;
            this.txtTitle.Font = new Font("Times New Roman", 16f, FontStyle.Bold);
            this.txtTitle.LocationFloat = new PointFloat(3.178914E-05f, 68.75f);
            this.txtTitle.Name = "txtTitle";
            this.txtTitle.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.txtTitle.SizeF = new SizeF(1087f, 30.25001f);
            this.txtTitle.StylePriority.UseFont = false;
            this.txtTitle.StylePriority.UseTextAlignment = false;
            this.txtTitle.Text = "DANH S\x00c1CH C\x00d4NG VIỆC";
            this.txtTitle.TextAlignment = TextAlignment.MiddleCenter;
            this.txtInformation.Font = new Font("Times New Roman", 9.75f, FontStyle.Italic | FontStyle.Bold);
            this.txtInformation.LocationFloat = new PointFloat(3.178914E-05f, 105f);
            this.txtInformation.Name = "txtInformation";
            this.txtInformation.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.txtInformation.SizeF = new SizeF(1087f, 17.70834f);
            this.txtInformation.StylePriority.UseFont = false;
            this.txtInformation.StylePriority.UseTextAlignment = false;
            this.txtInformation.TextAlignment = TextAlignment.MiddleCenter;
            this.txtAddress.LocationFloat = new PointFloat(154.3333f, 31.70837f);
            this.txtAddress.Name = "txtAddress";
            this.txtAddress.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.txtAddress.SizeF = new SizeF(488.375f, 17.70833f);
            this.txtAddress.Text = "txtAddress";
            this.ptPhoto.LocationFloat = new PointFloat(9.00001f, 5f);
            this.ptPhoto.Name = "ptPhoto";
            this.ptPhoto.SizeF = new SizeF(88.54166f, 58.33333f);
            this.ptPhoto.Sizing = ImageSizeMode.ZoomImage;
            this.txtCompany.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.txtCompany.LocationFloat = new PointFloat(105.5417f, 10.00001f);
            this.txtCompany.Name = "txtCompany";
            this.txtCompany.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.txtCompany.SizeF = new SizeF(537.1666f, 17.70833f);
            this.txtCompany.StylePriority.UseFont = false;
            this.txtCompany.Text = "txtCompany";
            this.xrLabel2.LocationFloat = new PointFloat(105.5417f, 31.70827f);
            this.xrLabel2.Name = "xrLabel2";
            this.xrLabel2.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLabel2.SizeF = new SizeF(48.79157f, 17.70833f);
            this.xrLabel2.Text = "Địa chỉ:";
            this.GroupHeader1.Controls.AddRange(new XRControl[] { this.xrTable1 });
            this.GroupHeader1.HeightF = 42.70833f;
            this.GroupHeader1.Name = "GroupHeader1";
            this.xrTable1.AnchorVertical = VerticalAnchorStyles.Bottom;
            this.xrTable1.BackColor = Color.WhiteSmoke;
            this.xrTable1.Borders = BorderSide.All;
            this.xrTable1.LocationFloat = new PointFloat(4.768372E-05f, 0f);
            this.xrTable1.Name = "xrTable1";
            this.xrTable1.Rows.AddRange(new XRTableRow[] { this.xrTableRow1 });
            this.xrTable1.SizeF = new SizeF(1087f, 42.70833f);
            this.xrTable1.StylePriority.UseBackColor = false;
            this.xrTable1.StylePriority.UseBorders = false;
            this.xrTableRow1.Cells.AddRange(new XRTableCell[] { this.colOrder, this.colEmployeeCode, this.colFirstName, this.colLastName, this.colBirthday, this.colSex, this.colBirthPlace, this.colMainAddress, this.xrTableCell1, this.colPosition });
            this.xrTableRow1.Name = "xrTableRow1";
            this.xrTableRow1.Weight = 1.0;
            this.colOrder.CanGrow = false;
            this.colOrder.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.colOrder.Name = "colOrder";
            this.colOrder.StylePriority.UseFont = false;
            this.colOrder.StylePriority.UseTextAlignment = false;
            this.colOrder.Text = "STT";
            this.colOrder.TextAlignment = TextAlignment.MiddleCenter;
            this.colOrder.Weight = 0.18749992582046493;
            this.colEmployeeCode.CanGrow = false;
            this.colEmployeeCode.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.colEmployeeCode.Name = "colEmployeeCode";
            this.colEmployeeCode.StylePriority.UseFont = false;
            this.colEmployeeCode.StylePriority.UseTextAlignment = false;
            this.colEmployeeCode.Text = "C\x00f4ng việc";
            this.colEmployeeCode.TextAlignment = TextAlignment.MiddleCenter;
            this.colEmployeeCode.Weight = 1.3263884529153445;
            this.colFirstName.CanGrow = false;
            this.colFirstName.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.colFirstName.Name = "colFirstName";
            this.colFirstName.StylePriority.UseFont = false;
            this.colFirstName.StylePriority.UseTextAlignment = false;
            this.colFirstName.Text = "Độ ưu ti\x00ean";
            this.colFirstName.TextAlignment = TextAlignment.MiddleCenter;
            this.colFirstName.Weight = 0.26099999632948856;
            this.colLastName.CanGrow = false;
            this.colLastName.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.colLastName.Name = "colLastName";
            this.colLastName.StylePriority.UseFont = false;
            this.colLastName.StylePriority.UseTextAlignment = false;
            this.colLastName.Text = "Ng\x00e0y bắt đầu";
            this.colLastName.TextAlignment = TextAlignment.MiddleCenter;
            this.colLastName.Weight = 0.36400048061823553;
            this.colBirthday.CanGrow = false;
            this.colBirthday.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.colBirthday.Name = "colBirthday";
            this.colBirthday.StylePriority.UseFont = false;
            this.colBirthday.StylePriority.UseTextAlignment = false;
            this.colBirthday.Text = "Ng\x00e0y kết th\x00fac";
            this.colBirthday.TextAlignment = TextAlignment.MiddleCenter;
            this.colBirthday.Weight = 0.36449932576553368;
            this.colSex.CanGrow = false;
            this.colSex.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.colSex.Name = "colSex";
            this.colSex.StylePriority.UseFont = false;
            this.colSex.StylePriority.UseTextAlignment = false;
            this.colSex.Text = "Trạng th\x00e1i";
            this.colSex.TextAlignment = TextAlignment.MiddleCenter;
            this.colSex.Weight = 0.56861148573850351;
            this.colBirthPlace.CanGrow = false;
            this.colBirthPlace.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.colBirthPlace.Name = "colBirthPlace";
            this.colBirthPlace.StylePriority.UseFont = false;
            this.colBirthPlace.StylePriority.UseTextAlignment = false;
            this.colBirthPlace.Text = "Mức độ ho\x00e0n th\x00e0nh";
            this.colBirthPlace.TextAlignment = TextAlignment.MiddleCenter;
            this.colBirthPlace.Weight = 0.37333333208033;
            this.colMainAddress.CanGrow = false;
            this.colMainAddress.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.colMainAddress.Name = "colMainAddress";
            this.colMainAddress.StylePriority.UseFont = false;
            this.colMainAddress.StylePriority.UseTextAlignment = false;
            this.colMainAddress.Text = "Chi ph\x00ed";
            this.colMainAddress.TextAlignment = TextAlignment.MiddleCenter;
            this.colMainAddress.Weight = 0.35588928751278426;
            this.xrTableCell1.CanGrow = false;
            this.xrTableCell1.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.xrTableCell1.Name = "xrTableCell1";
            this.xrTableCell1.StylePriority.UseFont = false;
            this.xrTableCell1.StylePriority.UseTextAlignment = false;
            this.xrTableCell1.Text = "Người chịu tr\x00e1ch nhiệm";
            this.xrTableCell1.TextAlignment = TextAlignment.MiddleCenter;
            this.xrTableCell1.Weight = 0.54082076622260522;
            this.colPosition.CanGrow = false;
            this.colPosition.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.colPosition.Name = "colPosition";
            this.colPosition.StylePriority.UseFont = false;
            this.colPosition.StylePriority.UseTextAlignment = false;
            this.colPosition.Text = "Ghi ch\x00fa";
            this.colPosition.TextAlignment = TextAlignment.MiddleCenter;
            this.colPosition.Weight = 1.1992901698340537;
            this.ReportFooter.HeightF = 3f;
            this.ReportFooter.Name = "ReportFooter";
            base.Bands.AddRange(new Band[] { this.Detail, this.TopMargin, this.BottomMargin, this.ReportHeader, this.GroupHeader1, this.ReportFooter });
            base.Landscape = true;
            base.Margins = new Margins(0x30, 0x22, 70, 0x38);
            base.PageHeight = 0x33b;
            base.PageWidth = 0x491;
            base.PaperKind = PaperKind.A4;
            base.Version = "9.3";
            this.BeforePrint += new PrintEventHandler(this.rptListWork_BeforePrint);
            this.xrTable2.EndInit();
            this.xrTable1.EndInit();
            this.EndInit();
        }

        private void LoadData()
        {
            this.dtDate.Text = "Ng\x00e0y in: " + DateTime.Now.ToShortDateString();
            if (this.m_Status == -1)
            {
                this.txtTitle.Text = "DANH S\x00c1CH C\x00d4NG VIỆC";
            }
            else if (this.m_Status == 0)
            {
                this.txtTitle.Text = "DANH S\x00c1CH C\x00d4NG VIỆC ĐANG L\x00caN KẾ HOẠCH";
            }
            else if (this.m_Status == 1)
            {
                this.txtTitle.Text = "DANH S\x00c1CH C\x00d4NG VIỆC ĐANG THỰC HIỆN";
            }
            else if (this.m_Status == 2)
            {
                this.txtTitle.Text = "DANH S\x00c1CH C\x00d4NG VIỆC Đ\x00c3 HO\x00c0N TH\x00c0NH";
            }
            else
            {
                this.txtTitle.Text = "DANH S\x00c1CH C\x00d4NG VIỆC Đ\x00c3 HỦY BỎ";
            }
            if (this.m_Time != "")
            {
                this.txtInformation.Text = this.m_Time + ". Từ ng\x00e0y " + this.m_BeginDate.ToShortDateString() + " đến ng\x00e0y " + this.m_EndDate.ToShortDateString();
            }
            else
            {
                this.txtInformation.Text = "Từ ng\x00e0y " + this.m_BeginDate.ToShortDateString() + " đến ng\x00e0y " + this.m_EndDate.ToShortDateString();
            }
            HRM_WORK hrm_work = new HRM_WORK();
            DataSet set = new DataSet();
            DataTable table = new DataTable();
            table = hrm_work.GetListByDateStatus(this.m_BeginDate, this.m_EndDate, this.m_Status);
            set.Tables.Add(table);
            base.DataSource = set;
            base.DataMember = table.TableName;
            base.DataAdapter = table;
        }

        private void rptListWork_BeforePrint(object sender, PrintEventArgs e)
        {
            this.LoadData();
            //if (MyInfo.Get(MyEncryption.Encrypt("ERP01", "123654", true)) == "OK")
            {
                this.txtCompany.Text = "";//MyInfo.Company.ToUpper();
                this.txtAddress.Text = "";//MyInfo.Address;
                this.ptPhoto.Image = null;//MyInfo.Photo;
            }
            CreateFooterReport.CreateFooter("IsOther", this.ReportFooter, this);
        }

        private void txtComplete_BeforePrint(object sender, PrintEventArgs e)
        {
            this.txtComplete.Text = this.txtComplete.Text + "%";
        }

        private void txtOrder_BeforePrint(object sender, PrintEventArgs e)
        {
            this.m_Order++;
            this.txtOrder.Text = this.m_Order.ToString();
        }

        private void txtStatus_BeforePrint(object sender, PrintEventArgs e)
        {
            if (this.txtStatus.Text == "0")
            {
                this.txtStatus.Text = "Chưa bắt đầu";
            }
            else if (this.txtStatus.Text == "1")
            {
                this.txtStatus.Text = "Đang thực hiện";
            }
            else if (this.txtStatus.Text == "2")
            {
                this.txtStatus.Text = "Đ\x00e3 ho\x00e0n th\x00e0nh";
            }
            else
            {
                this.txtStatus.Text = "Đ\x00e3 hủy bỏ";
            }
        }
    }
}

